Building automation systems are often used to control safety, security and/or comfort levels within a building or other structure. Illustrative but non-limiting examples of building automation systems include Heating, Ventilation and/or Air Conditioning (HVAC) systems, security systems, lighting systems, fire suppression systems and/or the like. In some cases, a building automation system may enter an unoccupied mode when the building is expected to be unoccupied and an occupied mode when the building is expected to be occupied. When the building automation system includes an HVAC system, the building automation system may set a temperature setpoint of the HVAC system to a more energy efficient setting when in an unoccupied mode and a more comfortable setting when in an occupied mode. When the building automation system includes a security system, the building automation system may set the security system to an away state when in an unoccupied mode and an unlocked or home state when in an occupied mode. In some cases, geofencing may be used to help determine if the building is occupied or unoccupied, and the building automation system may operate accordingly.